-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: no error for inline array schema when items field is a ref #257
Conversation
224b90d
to
5216114
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good but I think there is a twist that we need to consider.
5216114
to
ffe2c19
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
Purpose: - generator flattens reference to an array schema back into an inline schema Changes: - Add a check to see if the schema is an array with an items field that uses a ref - Add a check to see if the array schema has primitive type items - Add reusable isPrimitiveType function Tests: - Add tests to ensure the validator does not flag different variations of this array schema - Update expected warnings in tests that use specs with this array schema - Add test to ensure arrays with primitive-type items are not flagged - Add tests for isPrimitiveType function
ffe2c19
to
681c103
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
## [0.35.1](v0.35.0...v0.35.1) (2021-03-08) ### Bug Fixes * no error for inline array schema when items field is a ref ([#257](#257)) ([4dd3708](4dd3708))
🎉 This PR is included in version 0.35.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Purpose:
Changes:
inline_response_schema
check. I did not find an equivalent check for inline request bodies.Tests: